//
//  ChartSocket.h
//  socket
//
//  Created by Herbert Dai on 14-10-24.
//  Copyright (c) 2014年 Herbert Dai. All rights reserved.
//

#import "ChartSocketDelegate.h"
#import <CocoaAsyncSocket/GCDAsyncSocket.h>
#import <Foundation/Foundation.h>

@interface ChartSocket : NSObject<GCDAsyncSocketDelegate> {

}
@property(nonatomic, strong) id<ChartSocketDelegate> delegate;

@property(nonatomic, assign) int timeout;

@property(nonatomic, assign, readonly) BOOL isConnected;

- (ChartSocket *)init:(NSString *)host withPort:(UInt16)port;

- (void)connect;
- (void)disconnect;

- (void)emit:(NSData *)data withTag:(NSInteger) tag;

+ (NSData *)UUFlagData;

@end